package com.fengke.dao.model;

public class SystemParam extends BaseEntity {
	private static final long serialVersionUID = -84354457646521844L;
	public enum ParamType {
		access_token(0),
		jsapi_ticket(1);
		private int type;
		ParamType(int type) {
			this.type = type;
		}
		public int getType(){
			return this.type;
		}
	}
	private String paramKey;
	private String paramValue;
	private ParamType type;
	private Integer mtype;
	private String description;
	public String getParamKey() {
		return paramKey;
	}
	public void setParamKey(String paramKey) {
		this.paramKey = paramKey;
	}
	public String getParamValue() {
		return paramValue;
	}
	public void setParamValue(String paramValue) {
		this.paramValue = paramValue;
	}
	public ParamType getType() {
		return type;
	}
	public void setType(ParamType type) {
		this.type = type;
	}
	public Integer getMtype() {
		if(this.type == null) {
			return null;
		}
		this.mtype = this.type.getType();
		return mtype;
	}
	public void setMtype(Integer mtype) {
		if(mtype == null) {
			return ;
		}
		if(mtype == ParamType.access_token.getType()) {
			this.type = ParamType.access_token;
		} else if(mtype == ParamType.jsapi_ticket.getType()) {
			this.type = ParamType.jsapi_ticket;
		}
		this.mtype = this.type.getType();
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
}
